//
//  HMStatusNormalCell.swift
//  weibo10
//
//  Created by mac on 15/10/26.
//  Copyright © 2015年 itheima. All rights reserved.
//

import UIKit

class HMStatusNormalCell: HMStatusCell {
    override var viewModel: HMStatusViewModel? {
        didSet {
            picView.snp_updateConstraints(closure: { (make) -> Void in
                let offset = viewModel?.thumbnailUrls?.count > 0 ? statusCellMargin : 0
                make.top.equalTo(txtLabel.snp_bottom).offset(offset)
                }) 
        }
    }
    

}
// MARK: - 设置UI
extension HMStatusNormalCell {
    override func setupUI() {
        super.setupUI()
        picView.snp_makeConstraints { (make) -> Void in
            make.top.equalTo(txtLabel.snp_bottom).offset(statusCellMargin)
            make.left.equalTo(contentView.snp_left).offset(statusCellMargin)
            make.width.equalTo(300)
            make.height.equalTo(90)
        }
    }
}